﻿Imports DAO
Imports DTO
Public Class MatHangBUS
    Dim mathang As New MatHangDAO

    Public Function LoadMH() As DataTable
        Dim dtmathang As New DataTable()
        dtmathang = mathang.LoadMH()
        Return dtmathang
    End Function


    Public Shared Function laytheoID(ByVal id As Integer) As MatHangDTO
        Dim mhDAO As New MatHangDAO()
        Return mhDAO.laytheoID(id)
    End Function

    Public Shared Function LayTatCa() As IList
        Dim mhDAO As New MatHangDAO()
        Return mhDAO.LayTatCa()
    End Function

    Public Shared Function LayTatCaTT() As DataTable
        Dim mhDAO As New MatHangDAO()
        Return mhDAO.LayTatCaTT()
    End Function

    'Public Function Layid(ByVal id As Integer) As MatHangDTO
    '    Dim mhDao As New MatHangDAO()
    '    Return mhDao.LayTheoID(id)
    'End Function

    Public Shared Sub ThemSP(ByVal spdto As MatHangDTO)
        Dim sp As New MatHangDAO()
        sp.Themsp(spdto)
    End Sub

    Shared Function loadTheoID(ByVal masp As Integer) As DataTable
        Dim mhDao As New MatHangDAO()
        Return mhDao.LoadDsSPTheoMA(masp)
    End Function



  

End Class
